<?php
		
	Test::Begin('NULL -> SQL');
	Test::AssertEqual('NULL', ''.new Sql(null));

	Test::Begin('String -> SQL');
	Test::AssertEqual('\'test\'', ''.new Sql('test'));

	Test::Begin('Boolean -> SQL');
	Test::AssertEqual('1', ''.new Sql(true));
	Test::AssertEqual('0', ''.new Sql(false));

	Test::Begin('Integer -> SQL');
	Test::AssertEqual('15', ''.new Sql(15));

	Test::Begin('Float -> SQL');
	Test::AssertEqual('15.34', ''.new Sql(15.34));
	Test::AssertEqual('15', ''.new Sql(15.0));
	Test::AssertEqual('0', ''.new Sql(0.0));

	Test::Begin('DateTime -> SQL');
	$d = ImmutableDateTime::Make(2000,1,2,12,13,14);
	Test::AssertEqual('\'2000-01-02 12:13:14\'', ''.new Sql($d));
	Test::AssertEqual('\'2000-01-02 12:13:14\'', ''.new Sql($d->AsDateTime()));

	Test::Begin('Time -> SQL');
	Test::AssertEqual('\'0001-01-01 12:13:14\'', ''.new Sql($d->GetTime()));

	Test::Begin('TimeSpan -> SQL');
	$t = ImmutableTimeSpan::Make(1,2,3,4);
	Test::AssertEqual('93784', ''.new Sql($t));

?>
